package main.java.com.imooc.security.base64;
import java.util.Base64;
public class ImmocBase64 {
	public static String src="imooc security base 64";
	public static void main(String[] args) {
		jdkBase64();
	}
	public static void jdkBase64(){
		try {
			String CipherText=Base64.getEncoder().encodeToString(src.getBytes("utf-8"));
			System.out.println(CipherText);
			String PlainText=new String(Base64.getDecoder().decode(CipherText));
			System.out.println(PlainText);
		} catch (Exception e) {
			// TODO: handle exception
		}	
	}
}
